home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-06-04 | 2.5 KB | 72 lines | [TEXT/MPS ] |
- #
- # File: MathTool.vulib
- #
- # Written by: David Gaxiola
- #
- # Contents: MathTool interface.
- #
- # Copyright © 1992 Apple Computer, Inc. All rights reserved.
- #
- # Change history:
- # 10/30/92 PRT Add declarations for required tool services.
- # Make parameters 'undefined' to allow either numbers
- # or strings.
- # 8/11/92 DGG Created.
- #
- # Note: The TeachText file “MathTool ReadMe” explains the services that MathTool
- # provides, and lists what each service takes as arguments and returns as results.
- # (For the services common to all Virtual User external tools, see the Virtual
- # User Language Reference manual.) The script file “MathTool Sample.vu"
- # provides a few simple examples in using the MathTool.
- #
-
- task DefineMathGlobals()
- begin
- global gPi := "3.141592654";
- global gE := "2.718281828";
- end;
-
- tool MathTool s:'VUmt'
- begin
-
- # Services specific to MathTool:
-
- Service "fplus"('undefined', 'undefined') return 'String';
- Service "fminus"('undefined', 'undefined') return 'String';
- Service "ftimes"('undefined', 'undefined') return 'String';
- Service "fdivide"('undefined', 'undefined') return 'String';
- Service "fcompare"('undefined', 'undefined') return 'Integer';
-
- Service "sin"('undefined') return 'String';
- Service "cos"('undefined') return 'String';
- Service "tan"('undefined') return 'String';
- Service "asin"('undefined') return 'String';
- Service "acos"('undefined') return 'String';
- Service "atan"('undefined') return 'String';
- Service "sqrt"('undefined') return 'String';
- Service "power"('undefined', 'undefined') return 'String';
- Service "ln"('undefined') return 'String';
- #
- # These services work on MC680x0 'LONG' integers. You can pass them either short integers
- # (ones between -32767 and 32767) or long integers enclosed in quotations.
- #
- Service "lplus"('undefined', 'undefined') return 'String';
- Service "lminus"('undefined', 'undefined') return 'String';
- Service "ltimes"('undefined', 'undefined') return 'String';
- Service "ldivide"('undefined', 'undefined') return 'String';
- Service "lcompare"('undefined', 'undefined') return 'Integer';
- Service "lmod"('undefined', 'undefined') return 'String';
-
-
- # Services common to all Virtual User 2.0 external tools:
-
- Service "Initialize"( 'undefined' ); # pass TRUE for target, FALSE for host
- Service "Cancel"( 'string' );
- Service "GetToolServices"() return 'list';
- Service "GetToolVersion"() return 'list';
- Service "Poll"( 'string' ) return 'string';
- Service "ServiceSupported"( 'string' ) return 'undefined';
- Service "Quit"();
-
- end;
-